package com.kamistoat.meimeimall.meimeimallorder.dao;

import com.kamistoat.meimeimall.meimeimallorder.entity.OrderItemEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单项信息
 * 
 * @author kamistoat
 * @email linjianshanke@163.com
 * @date 2021-09-12 16:42:29
 */
@Mapper
public interface OrderItemDao {

    /**
     * 查询指定订单SN下的所有订单小项
     */
    List<OrderItemEntity> selectItemByOrderSn(@Param("orderSn") String orderSn);

    /**
     * 批插
     */
    List<Long> insertBatch(@Param("entityList") List<OrderItemEntity> orderItemEntityList);

    /**
     * 修改商品小项所属订单SN
     * @param orderItemEntity
     * @return
     */
    Long updateItemBelongOrderSn(@Param("entity") OrderItemEntity orderItemEntity);
}
